package com.hjt.service.vo;

import com.hjt.db.pojo.GameScreenRecordDO;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class ActionRecordListVO {
    private List<Info> list;

    public ActionRecordListVO() {
        this.list = new ArrayList<Info>();
    }

    @Data
    public static class Info {
        private String deviceId;
        private Double x;
        private Double y;
        private String path;

        public static Info build(GameScreenRecordDO record) {
            Info info = new Info();
            info.deviceId = record.getDeviceId();
            info.x = record.getX();
            info.y = record.getY();
            info.path = record.getScreenSnapshot();
            return info;
        }
    }
}
